package com.huawei.appgallery.appcomment.ui.usercomment;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.ViewGroup;
import android.view.ViewGroup.LayoutParams;
import o.azb;
import o.bcg.d;
import o.cdr;
import o.cgz;
import o.chy;
import o.cih;
import o.ckt;

public class UserReplyNode extends cdr {

    public static class e implements OnClickListener {
        private final int ˊ;
        private final cgz ˎ;
        private final chy ˏ;

        public e(chy o_chy, cgz o_cgz, int i) {
            this.ˏ = o_chy;
            this.ˎ = o_cgz;
            this.ˊ = i;
        }

        public void onClick(View view) {
            if (this.ˏ != null && this.ˎ != null) {
                this.ˏ.ˏ(this.ˊ, this.ˎ);
            }
        }
    }

    public UserReplyNode(Context context) {
        super(context, 1);
    }

    public boolean ˊ(ViewGroup viewGroup, ViewGroup viewGroup2) {
        View inflate = LayoutInflater.from(this.ॱ).inflate(d.ॱˎ, null);
        azb.ˏ(inflate);
        cih userReplyInfoCard = new UserReplyInfoCard(this.ॱ);
        userReplyInfoCard.ˏ(inflate);
        ˊ(userReplyInfoCard);
        viewGroup.addView(inflate, new LayoutParams(-1, -2));
        return true;
    }

    public void ˋ(chy o_chy) {
        for (int i = 0; i < ˊॱ(); i++) {
            cgz ˊ = ˊ(i);
            if (ˊ instanceof UserReplyInfoCard) {
                UserReplyInfoCard userReplyInfoCard = (UserReplyInfoCard) ˊ;
                userReplyInfoCard.ˏ().setOnClickListener(new ckt(new e(o_chy, ˊ, 1006)));
                userReplyInfoCard.ᐝ().setOnClickListener(new ckt(new e(o_chy, ˊ, 1006)));
                userReplyInfoCard.ॱ().setOnClickListener(new ckt(new e(o_chy, ˊ, 1006)));
                userReplyInfoCard.ˎ().setOnClickListener(new ckt(new e(o_chy, ˊ, 1006)));
                userReplyInfoCard.ˋ().setOnClickListener(new e(o_chy, ˊ, 1007));
                userReplyInfoCard.ॱॱ().setOnClickListener(new ckt(new e(o_chy, ˊ, 1008)));
                userReplyInfoCard.ˊ().setOnClickListener(new ckt(new e(o_chy, ˊ, 0)));
            }
        }
    }
}
